Code
plot_ly(tendencia_mensual, x = ~fecha, y = ~Atenciones,
type = 'scatter', mode = 'lines+markers',
line = list(color = '#0d6efd', width = 2),
marker = list(size = 6),
text = ~paste("Año:", ano, "<br>Mes:", mes, "<br>Atenciones:", Atenciones),
hoverinfo = "text") %>%
layout(
title = "Evolución Mensual de Atenciones Individuales",
xaxis = list(title = "Tiempo (Mes/Año)", tickformat = "%m-%Y"),
yaxis = list(title = "Número de Atenciones"),
hovermode = "x unified"
)